package com.isorf.mapper;

import com.isorf.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from users")
    List<User> userList();
    @Update("update users set disable=1-disable where id=#{id}")
    int updateDisable(int id);
    @Select("select * from users")
    List<User> pageList();
    @Select("select * from users where account=#{account}")
    User findByUserName(String username);
    @Insert("insert into users(account, password, sex, integral, email) values(#{account}, #{password}, #{sex}, #{integral}, #{email})")
    boolean register(User user);
}
